<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-06-10 15:59:18
 * @Description: 供货商员工，发货用的
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-06-22 09:23:26
 * @FilePath: /qingshanERP/database/migrations/qingshanerp/2021_06_10_155918_create_supplier_contact.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSupplierContact extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('supplier_staffs', function (Blueprint $table) {
            $table->id();
            $table->integer('supplier_id')->default(0)->comment('供应商ID');
            $table->string('staffname', 20)->comment('员工姓名');
            $table->char('phone', 15)->default(0)->comment('员工手机号，登录用的');
            $table->string('email')->default('ss@qq.com')->comment('邮箱');
            $table->char('crypt', 10)->default('1111111111')->comment('秘钥');
            $table->char('password', 50)->default('a')->comment('密码');
            $table->ipAddress('lastip')->default('0.0.0.0')->comment('最后登录 IP');
            $table->dateTime('lasttime')->useCurrent()->comment('最后登录时间');
            $table->boolean('status')->default(1)->comment('状态，1 正常，0 禁用');
            $table->boolean('del_flag')->default(0)->comment('删除状态，1 删除，0 未删除');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('supplier_contacts');
    }
}
